SetStackPolicy
Description
call the SetStackPolicy interface to set the resource stack policy.
Request Method
POST
Request Path
/apsara/route/ROS/SetStackPolicy
Request Parameters Common Parameters
Name | Location | Type | Required | Sample value | Description |
---|---|---|---|---|---|
regionId | BODY | string | Yes | No sample value for this parameter. | region id |
RegionId | BODY | string | Yes | cn-hangzhou | the region ID to which the resource stack belongs. |
StackPolicyBody | BODY | string | No | {"Statement":[{"Effect":"Allow","Action":"Update:*","Principal":"*","Resource":"*"}]} | contains the structure of the resource stack policy body, with a length of 1~16,384 bytes. Description You must specify the parameter StackPolicyBody or StackPolicyURL, but you cannot specify both. |
StackPolicyURL | BODY | string | No | oss://ros/stack-policy/demo | the location of the file containing the resource stack policy. The URL must point to a policy located in a Web server (HTTP or HTTPS) or Aliyun OSS bucket (for example, oss:// ros/stack-policy/demo, oss:// ros/stack-policy/demo?RegionId = cn-hangzhou). The maximum length of the policy file is 16 and 384 bytes. If the OSS region is not specified, the default RegionId is the same as the interface parameter. description you must specify the parameter StackPolicyBody or StackPolicyURL, but not at the same time. The maximum length of the URL is 1350 bytes. |
version | BODY | string | No | 2016-01-01 | version of api |
StackId | BODY | string | Yes | 4a6c9851-3b0f-4f5f-b4ca-a14bf691**** | resource stack ID. |
Return data
Name | Type | Sample value | Description |
---|---|---|---|
RequestID | string | 1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC | Request id |
Example
Successful Response example
{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}
Failed Response example
{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}
}